Probably not. It would be nice to have some organized way of reading and storing the values.
An array is an object that is used to store a list of values.
It is made out of a contiguous block of memory that is divided into a
number of "slots."
Each slot holds a value,
and all the values are of
the same type.
In the example array at right,
each slot holds an int
.
The name of this array is data
.
The slots are indexed 0 through 9.
Each slot can be accessed by using its index.
For example,
data[0]
is the slot which is indexed by zero (which contains the value 23).
data[5]
is the slot which is indexed by 5 (which contains the value 14).
Facts:
Sometimes the index is called a subscript.
The expression
data[5]
is usually pronounced "data-sub-five" as if it were
an expression from mathematics: data5
.